package com.jichaoyun.model.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author zhangzhen
 * @since 2023-11-03
 */
@Data
@ColumnWidth(20)
@TableName("role")
public class Role implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "role_id",type = IdType.AUTO)
    @ExcelProperty(value = "序号",index = 0)
    private Integer roleId;

    @ExcelProperty(value = "角色名称",index = 1)
    private String roleName;

    @ExcelProperty(value = "角色说明",index = 2)

    private String roleDescription;

    /**
     * 0费用1启动
     */
    @ExcelIgnore
    private Boolean status;

    @TableField(exist = false)
    @ExcelProperty(value = "角色状态",index = 3)
    private String statusStr;


    @ExcelProperty(value = "创建时间",index = 4)

    private LocalDateTime createTime;

    /**
     * 该角色用户的数量
     */
    @TableField(exist = false)
    @ExcelProperty(value = "角色成员",index = 5)
    private Integer num;

    /**
     * 该角色的菜单id列表
     */
    @ExcelIgnore
    @TableField(exist = false)
    private List<Integer> menuIdList;
}
